package com.ysjy.course.exception;

import com.wkbb.sports.exception.ResultEnum;

/**
 * @author: lbh
 * @date: 2018/11/16 15:07
 * @description: 自定义异常
 */
public class MyException extends RuntimeException{

    private Integer code;

    public MyException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public MyException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
